#ifndef __GRAPHCUT_H__
#define __GRAPHCUT_H__
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "image.h"
#include "weights.h"
#include "model.h"
#include "gcgraph.h"

class GraphCut {
public:
	GraphCut(Image i, Trimap t, Model* m);
	~GraphCut();
	Multimap			process();
	Multimap			getProbs() const;
	const Image		getImage() const;
	const Model*	getModel() const;
	const Trimap	getTrimap() const;
private:
	Trimap				getHardSegmentation() const;
	Multimap			getSoftSegmentation(const Trimap & t, const Trimap & pre) const;
	Trimap				createRibbonTrimap(const Trimap & t, const Trimap & pre, Multimap & m, int offset) const;
	Multimap			_aProbs;
	Trimap	 			_oTrimap;
	Image					_oImage;
	Model*				_oModel;
	GraphCutGraph	_oGraph;
/* GETTER/SETTER */
};
#endif
